import request from "@/utils/request";

// 查询枚举值
export function getQueryEnumList(query) {
  return request({
    url: "/strategy/queryEnumList",
    method: "post",
    data: query,
  });
}
// 查询规则列表
export function getQueryStrategyRuleList(pageNum, pageSize, query) {
  return request({
    url:
      "/strategy/queryStrategyList?pageNum=" +
      pageNum +
      "&pageSize=" +
      pageSize,
    method: "post",
    data: query,
  });
}

// 执行规则
export function executeStrategyRule(query) {
  return request({
    url: "/strategy/executeStrategyById",
    method: "post",
    data: query,
  });
}
// 删除规则
export function deleteStrategyRule(query) {
  return request({
    url: "/strategy/deleteStrategyById",
    method: "post",
    data: query,
  });
}
// 复制规则
export function copyStrategyRule(query) {
  return request({
    url: "/strategy/copyStrategy",
    method: "post",
    data: query,
  });
}
// 检查是否可以打开规则详情
export function checkStrategyRuleOpen(query) {
  return request({
    url: "/strategy/checkStrategyById",
    method: "post",
    data: query,
  });
}
//获取模版列表
export function queryMessageConfigList(query, pageNum, pageSize) {
  return request({
    url:
      "/message/queryMessageConfigList?pageNum=" +
      pageNum +
      "&pageSize=" +
      pageSize,
    method: "post",
    data: query,
  });
}
//获取策略详情
export function queryStrategyById(query) {
  return request({
    url: "/strategy/queryStrategyById",
    method: "post",
    data: query,
  });
}
//保存策略详情
export function saveStrategyById(query) {
  return request({
    url: "/strategy/insertOrUpdateStrategyList",
    method: "post",
    data: query,
  });
}

// // 查询定时任务调度详细
// export function getJob(jobId) {
//   return request({
//     url: "/monitor/job/" + jobId,
//     method: "get",
//   });
// }

// // 新增定时任务调度
// export function addJob(data) {
//   return request({
//     url: "/monitor/job",
//     method: "post",
//     data: data,
//   });
// }
